<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh_CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">
<title>产品库存列表</title>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../js/jquery-1.9.1.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/jqPaginator.js"></script>
<script src="../stocks/product.js"></script>
<!-- Bootstrap -->

<link href="../css/bootstrap.min.css" rel="stylesheet" />
<link href="../stocks/product.css" rel="stylesheet" />
<jsp:include page="addProduct.jsp"></jsp:include>
<style>
body {
	font-size: 16px;
	font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>


	<div class="container-fluid" style="width: 100%;">
		<div class="row-fluid">
			<h3>产品库存列表</h3>
		</div>
		<!-- class="col-sm-8" -->
		<div
			style="margin-left: 50px; margin-right: 0; border-width: 2px; border-color: #AA0000">

			<div id="tools" class="col-md-4 pull-right">
				<ul class="nav nav-pills nav-justified " role="tablist">
					<li role="presentation" class=" active" style="padding-left: 10px;">
						<button id="queryBtn" class="btn  btn-sm btn-info">查询</button>
					</li>
					
				</ul>
			</div>
			<div style="margin-top: 40px;">
			产品名称:
				<input type="text" id="productName" name="productName" value="${productName}" />
				<input type="hidden" id="proTypeId" name="typeId" value="${typeId }" />
				类型:<select id="reType" name="reType">
					<option value="-1">全部</option>
					<c:forEach var="reType" items="${reTypes}">
						<option <c:if test="${reType.key==typeId}">selected</c:if>
							value="${reType.key}">${reType.val}</option>
					</c:forEach>
				</select>
				<table id="products" border="1"
					class="table table-bordered table-hover">
					<tr>
						<td><input id="selectAll" class="checkbox" type="checkbox" /></td>
					
						<td>产品编号</td>
						<td>产品名称</td>
						<td>类型</td>
						<td>产地</td>
						<td>总库存</td>
						<td>临界库存</td>
						
						
						<td colspan="3">操作</td>
					</tr>
					<c:forEach var="product" items="${pageResult.resultList}">
						<tr>
							<td><input name="proId" id="proId" class="checkbox"
								type="checkbox" value="${product.id}" /></td>
						
							<td>${product.proCode}</td>
							<td>${product.proName}</td>
							<td>${product.typeName}</td>
							<td>${product.grown}</td>
							<td>${product.total}</td>
							<td>${product.minTotal}</td>
							
							<td>
								<button name="editBtn" objId="${product.id}"
									class="btn btn-sm-block">修改</button>
							</td>
							

						</tr>
					</c:forEach>
				</table>
			</div>
		</div>
	</div>
	</div>
	<div style="text-align: center;">
		<ul class="pagination" id="pagination2"></ul>
	</div>
	<div style="text-align: center;">
		<div id="pageResult">
			<input id="pageCount" type="hidden" value="${pageResult.pageCount}" />
			<input id="totalCount" type="hidden" value="${pageResult.totalCount}" />
			<input id="pageIndex" type="hidden" value="${pageResult.pageIndex}" />
			<input id="pageSize" type="hidden" value="${pageResult.pageSize}" />
		</div>
		<!-- footer -->

		<p>vinace-Demo by 御风林海</p>

	</div>

</body>

</html>